package beautiful.butterfly.drds.datasource.connection_contexts.api;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

public abstract class AbstractConnectionContextsFactory implements IConnectionContextsFactory {
    public static Properties getProperties() throws IOException {
        String rootPath = AbstractConnectionContextsFactory.class.getClassLoader().getResource("").getFile() + AbstractConnectionContextsFactory.class.getName().replace(".", "/").replace(AbstractConnectionContextsFactory.class.getSimpleName(), "");
        Properties properties = new Properties();
        String path = (rootPath + "/zero.properties").replace("/", "\\").replace("\\target\\classes", "\\src\\main\\java");
        properties.load(new FileInputStream(new File(path)));
        return properties;
    }
}
